Crispo - Excel Challenge 44 2025

excel-challenges
weekly-exercises
Easy Sunday Excel Challenge
Published

November 2, 2025

Illustration for Crispo - Excel Challenge 44 2025

Challenge Description

Easy Sunday Excel Challenge

⭐ Accountant 1. 2020:2023 - Accountant - ABC 2. 2018:2019 - Analyst - Meta 3. 2016:2017 - Intern - Google

Solutions

library(tidyverse)
library(readxl)
library(glue)
library(janitor)

path = "files/2025-11-02/Challenge 73.xlsx"
input = read_excel(path, range = "B3:F9")
test  = read_excel(path, range = "H3:I6")
test$Experience = str_replace(test$Experience, "-Twitter", "- Twitter")

result = input %>%
  clean_names() %>%
  mutate(rn = row_number(), .by = candidate) %>%
  transmute(
    Candidate = candidate,
    Experience = glue("{rn}. {from_date}:{to_date} - {past_position} - {past_employer}")) %>%
  summarise(Experience = str_c(Experience, collapse = "\r\n"), .by = Candidate)

all.equal(result,test) 
# [1] TRUE
  • Logic:

    • Reads the workbook range needed for the challenge

    • Aggregates or ranks values at the correct grouping level

    • Builds the intermediate helper columns that drive the final answer

    • Uses direct text-pattern extraction instead of manual cleanup

  • Strengths:

    • The R solution stays compact and mirrors the workbook logic closely.
  • Areas for Improvement:

    • The code assumes the workbook layout and named ranges remain stable.
  • Gem:

    • The best part of the solution is choosing a tidy intermediate shape before producing the final answer.
import pandas as pd

path = "files/2025-11-02/Challenge 73.xlsx"
input = pd.read_excel(path, usecols="B:F", skiprows=2, nrows=7)
test = pd.read_excel(path, usecols="H:I", skiprows=2, nrows=3).rename(columns=lambda col: col.replace('.1', ''))
test['Experience'] = test['Experience'].str.replace('-Twitter', '- Twitter', regex=False)

input.columns = [c.strip().lower().replace(' ', '_') for c in input.columns]
input['rn'] = input.groupby('candidate').cumcount() + 1
input['Experience'] = input.apply(
    lambda r: f"{r['rn']}. {r['from_date']}:{r['to_date']} - {r['past__position']} - {r['past__employer']}", axis=1
)
result = input.groupby('candidate')['Experience'].apply('\n'.join).reset_index()
result.columns = ['Candidate', 'Experience']

print(result.equals(test)) # True
  • Logic:

    • Reads the workbook range needed for the challenge

    • Aggregates or ranks values at the correct grouping level

    • Applies the rule iteratively until the output is complete

  • Strengths:

    • The Python version keeps the same rule in a direct pandas-oriented workflow.
  • Areas for Improvement:

    • As with the R version, any workbook layout change would require small adjustments.
  • Gem:

    • The implementation stays close to the stated challenge instead of adding unnecessary complexity.

Difficulty Level

This task is moderate:

  • It combines familiar Excel-style logic with at least one non-trivial reshape, grouping, or parsing step.

  • The answer depends on getting the output layout exactly right.